package Leetcode;

public class Leetcode_176 {
    public static int busyStudent(int[] startTime, int[] endTime, int queryTime) {
        int n = startTime.length;
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if (startTime[i] <= queryTime && endTime[i] >= queryTime) {
                ans++;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        int[] startTime = {1,2,3}, endTime = {3,2,7};
        int queryTime = 4;
        System.out.println(busyStudent(startTime,endTime,queryTime));

    }
}
